#include <stdio.h>

int main() {
    unsigned long long counter = 1;
    unsigned long long mod = 1000000007;
    unsigned long long target;
    scanf("%llu", &target);
    for (unsigned long long i = 0; i < target; i++) {
        if (i & 1) {
            counter = (counter * 4) % mod;
            // 是素数而不是奇数，所以奇数位算4个
        }
        else {
            counter = (counter * 5) % mod;
        }
    }
    printf("%llu", counter);
    return 0;
}